3.379 \(\int x^5 (d+e x^r)^2 (a+b \log (c x^n)) \, dx\)

Optimal. Leaf size=103 \[ \frac{1}{6} \left (d^2 x^6+\frac{12 d e x^{r+6}}{r+6}+\frac{3 e^2 x^{2 (r+3)}}{r+3}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{36} b d^2 n x^6-\frac{2 b d e n x^{r+6}}{(r+6)^2}-\frac{b e^2 n x^{2 (r+3)}}{4 (r+3)^2} \]

[Out]

-(b*d^2*n*x^6)/36 - (b*e^2*n*x^(2*(3 + r)))/(4*(3 + r)^2) - (2*b*d*e*n*x^(6 + r))/(6 + r)^2 + ((d^2*x^6 + (3*e
^2*x^(2*(3 + r)))/(3 + r) + (12*d*e*x^(6 + r))/(6 + r))*(a + b*Log[c*x^n]))/6

________________________________________________________________________________________

Rubi [A]  time = 0.156101, antiderivative size = 103, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {270, 2334, 12, 14} \[ \frac{1}{6} \left (d^2 x^6+\frac{12 d e x^{r+6}}{r+6}+\frac{3 e^2 x^{2 (r+3)}}{r+3}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{36} b d^2 n x^6-\frac{2 b d e n x^{r+6}}{(r+6)^2}-\frac{b e^2 n x^{2 (r+3)}}{4 (r+3)^2} \]

Antiderivative was successfully verified.

[In]

Int[x^5*(d + e*x^r)^2*(a + b*Log[c*x^n]),x]

[Out]

-(b*d^2*n*x^6)/36 - (b*e^2*n*x^(2*(3 + r)))/(4*(3 + r)^2) - (2*b*d*e*n*x^(6 + r))/(6 + r)^2 + ((d^2*x^6 + (3*e
^2*x^(2*(3 + r)))/(3 + r) + (12*d*e*x^(6 + r))/(6 + r))*(a + b*Log[c*x^n]))/6

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int x^5 \left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac{1}{6} \left (d^2 x^6+\frac{3 e^2 x^{2 (3+r)}}{3+r}+\frac{12 d e x^{6+r}}{6+r}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac{1}{6} x^5 \left (d^2+\frac{12 d e x^r}{6+r}+\frac{3 e^2 x^{2 r}}{3+r}\right ) \, dx\\ &=\frac{1}{6} \left (d^2 x^6+\frac{3 e^2 x^{2 (3+r)}}{3+r}+\frac{12 d e x^{6+r}}{6+r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{6} (b n) \int x^5 \left (d^2+\frac{12 d e x^r}{6+r}+\frac{3 e^2 x^{2 r}}{3+r}\right ) \, dx\\ &=\frac{1}{6} \left (d^2 x^6+\frac{3 e^2 x^{2 (3+r)}}{3+r}+\frac{12 d e x^{6+r}}{6+r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{6} (b n) \int \left (d^2 x^5+\frac{12 d e x^{5+r}}{6+r}+\frac{3 e^2 x^{5+2 r}}{3+r}\right ) \, dx\\ &=-\frac{1}{36} b d^2 n x^6-\frac{b e^2 n x^{2 (3+r)}}{4 (3+r)^2}-\frac{2 b d e n x^{6+r}}{(6+r)^2}+\frac{1}{6} \left (d^2 x^6+\frac{3 e^2 x^{2 (3+r)}}{3+r}+\frac{12 d e x^{6+r}}{6+r}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.28463, size = 118, normalized size = 1.15 \[ \frac{1}{36} x^6 \left (6 a \left (d^2+\frac{12 d e x^r}{r+6}+\frac{3 e^2 x^{2 r}}{r+3}\right )+6 b \log \left (c x^n\right ) \left (d^2+\frac{12 d e x^r}{r+6}+\frac{3 e^2 x^{2 r}}{r+3}\right )+b n \left (-d^2-\frac{72 d e x^r}{(r+6)^2}-\frac{9 e^2 x^{2 r}}{(r+3)^2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x^5*(d + e*x^r)^2*(a + b*Log[c*x^n]),x]

[Out]

(x^6*(b*n*(-d^2 - (72*d*e*x^r)/(6 + r)^2 - (9*e^2*x^(2*r))/(3 + r)^2) + 6*a*(d^2 + (12*d*e*x^r)/(6 + r) + (3*e
^2*x^(2*r))/(3 + r)) + 6*b*(d^2 + (12*d*e*x^r)/(6 + r) + (3*e^2*x^(2*r))/(3 + r))*Log[c*x^n]))/36

________________________________________________________________________________________

Maple [C]  time = 0.299, size = 1924, normalized size = 18.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^5*(d+e*x^r)^2*(a+b*ln(c*x^n)),x)

[Out]

1/6*x^6*b*(3*e^2*(x^r)^2*r+d^2*r^2+12*d*e*x^r*r+18*e^2*(x^r)^2+9*d^2*r+36*d*e*x^r+18*d^2)/(3+r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^2*csgn(I*x^n)*csgn(I*c*x^n)^2-432*I*Pi*b*d*e*r^2*csgn(I
*c*x^n)^2*csgn(I*c)*x^r+1944*I*Pi*b*d*e*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*x^r+648*I*Pi*b*e^2*r*csgn(I*x^n)*c
sgn(I*c*x^n)*csgn(I*c)*(x^r)^2-972*I*Pi*b*e^2*csgn(I*x^n)*csgn(I*c*x^n)^2*(x^r)^2-972*I*Pi*b*e^2*csgn(I*c*x^n)
^2*csgn(I*c)*(x^r)^2-54*I*Pi*b*d^2*r^3*csgn(I*c*x^n)^2*csgn(I*c)-864*ln(c)*b*d*e*r^2*x^r-3240*ln(c)*b*d*e*r*x^
r-72*ln(c)*b*d*e*r^3*x^r+351*I*Pi*b*d^2*r^2*csgn(I*c*x^n)^3+972*I*Pi*b*d^2*r*csgn(I*c*x^n)^3-972*I*Pi*b*d^2*cs
gn(I*x^n)*csgn(I*c*x^n)^2-972*I*Pi*b*d^2*csgn(I*c*x^n)^2*csgn(I*c)+135*I*Pi*b*e^2*r^2*csgn(I*c*x^n)^3*(x^r)^2+
36*I*Pi*b*d*e*r^3*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*x^r+432*I*Pi*b*d*e*r^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*
c)*x^r-972*I*Pi*b*d^2*r*csgn(I*c*x^n)^2*csgn(I*c)+972*I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-3*I*Pi*b*
d^2*r^4*csgn(I*x^n)*csgn(I*c*x^n)^2+432*b*d*e*n*r*x^r+72*b*d*e*n*r^2*x^r-3*I*Pi*b*d^2*r^4*csgn(I*c*x^n)^2*csgn
(I*c)+9*I*Pi*b*e^2*r^3*csgn(I*c*x^n)^3*(x^r)^2-351*I*Pi*b*d^2*r^2*csgn(I*c*x^n)^2*csgn(I*c))/(3+r)^2/(6+r)^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(d+e*x^r)^2*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.32667, size = 1168, normalized size = 11.34 \begin{align*} \frac{6 \,{\left (b d^{2} r^{4} + 18 \, b d^{2} r^{3} + 117 \, b d^{2} r^{2} + 324 \, b d^{2} r + 324 \, b d^{2}\right )} x^{6} \log \left (c\right ) + 6 \,{\left (b d^{2} n r^{4} + 18 \, b d^{2} n r^{3} + 117 \, b d^{2} n r^{2} + 324 \, b d^{2} n r + 324 \, b d^{2} n\right )} x^{6} \log \left (x\right ) -{\left ({\left (b d^{2} n - 6 \, a d^{2}\right )} r^{4} + 324 \, b d^{2} n + 18 \,{\left (b d^{2} n - 6 \, a d^{2}\right )} r^{3} - 1944 \, a d^{2} + 117 \,{\left (b d^{2} n - 6 \, a d^{2}\right )} r^{2} + 324 \,{\left (b d^{2} n - 6 \, a d^{2}\right )} r\right )} x^{6} + 9 \,{\left (2 \,{\left (b e^{2} r^{3} + 15 \, b e^{2} r^{2} + 72 \, b e^{2} r + 108 \, b e^{2}\right )} x^{6} \log \left (c\right ) + 2 \,{\left (b e^{2} n r^{3} + 15 \, b e^{2} n r^{2} + 72 \, b e^{2} n r + 108 \, b e^{2} n\right )} x^{6} \log \left (x\right ) +{\left (2 \, a e^{2} r^{3} - 36 \, b e^{2} n + 216 \, a e^{2} -{\left (b e^{2} n - 30 \, a e^{2}\right )} r^{2} - 12 \,{\left (b e^{2} n - 12 \, a e^{2}\right )} r\right )} x^{6}\right )} x^{2 \, r} + 72 \,{\left ({\left (b d e r^{3} + 12 \, b d e r^{2} + 45 \, b d e r + 54 \, b d e\right )} x^{6} \log \left (c\right ) +{\left (b d e n r^{3} + 12 \, b d e n r^{2} + 45 \, b d e n r + 54 \, b d e n\right )} x^{6} \log \left (x\right ) +{\left (a d e r^{3} - 9 \, b d e n + 54 \, a d e -{\left (b d e n - 12 \, a d e\right )} r^{2} - 3 \,{\left (2 \, b d e n - 15 \, a d e\right )} r\right )} x^{6}\right )} x^{r}}{36 \,{\left (r^{4} + 18 \, r^{3} + 117 \, r^{2} + 324 \, r + 324\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(d+e*x^r)^2*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

1/36*(6*(b*d^2*r^4 + 18*b*d^2*r^3 + 117*b*d^2*r^2 + 324*b*d^2*r + 324*b*d^2)*x^6*log(c) + 6*(b*d^2*n*r^4 + 18*
b*d^2*n*r^3 + 117*b*d^2*n*r^2 + 324*b*d^2*n*r + 324*b*d^2*n)*x^6*log(x) - ((b*d^2*n - 6*a*d^2)*r^4 + 324*b*d^2
*n + 18*(b*d^2*n - 6*a*d^2)*r^3 - 1944*a*d^2 + 117*(b*d^2*n - 6*a*d^2)*r^2 + 324*(b*d^2*n - 6*a*d^2)*r)*x^6 +
9*(2*(b*e^2*r^3 + 15*b*e^2*r^2 + 72*b*e^2*r + 108*b*e^2)*x^6*log(c) + 2*(b*e^2*n*r^3 + 15*b*e^2*n*r^2 + 72*b*e
^2*n*r + 108*b*e^2*n)*x^6*log(x) + (2*a*e^2*r^3 - 36*b*e^2*n + 216*a*e^2 - (b*e^2*n - 30*a*e^2)*r^2 - 12*(b*e^
2*n - 12*a*e^2)*r)*x^6)*x^(2*r) + 72*((b*d*e*r^3 + 12*b*d*e*r^2 + 45*b*d*e*r + 54*b*d*e)*x^6*log(c) + (b*d*e*n
*r^3 + 12*b*d*e*n*r^2 + 45*b*d*e*n*r + 54*b*d*e*n)*x^6*log(x) + (a*d*e*r^3 - 9*b*d*e*n + 54*a*d*e - (b*d*e*n -
 12*a*d*e)*r^2 - 3*(2*b*d*e*n - 15*a*d*e)*r)*x^6)*x^r)/(r^4 + 18*r^3 + 117*r^2 + 324*r + 324)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**5*(d+e*x**r)**2*(a+b*ln(c*x**n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.30689, size = 1004, normalized size = 9.75 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(d+e*x^r)^2*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

1/36*(6*b*d^2*n*r^4*x^6*log(x) + 72*b*d*n*r^3*x^6*x^r*e*log(x) - b*d^2*n*r^4*x^6 + 6*b*d^2*r^4*x^6*log(c) + 72
*b*d*r^3*x^6*x^r*e*log(c) + 108*b*d^2*n*r^3*x^6*log(x) + 18*b*n*r^3*x^6*x^(2*r)*e^2*log(x) + 864*b*d*n*r^2*x^6
*x^r*e*log(x) - 18*b*d^2*n*r^3*x^6 + 6*a*d^2*r^4*x^6 - 72*b*d*n*r^2*x^6*x^r*e + 72*a*d*r^3*x^6*x^r*e + 108*b*d
^2*r^3*x^6*log(c) + 18*b*r^3*x^6*x^(2*r)*e^2*log(c) + 864*b*d*r^2*x^6*x^r*e*log(c) + 702*b*d^2*n*r^2*x^6*log(x
) + 270*b*n*r^2*x^6*x^(2*r)*e^2*log(x) + 3240*b*d*n*r*x^6*x^r*e*log(x) - 117*b*d^2*n*r^2*x^6 + 108*a*d^2*r^3*x
^6 - 9*b*n*r^2*x^6*x^(2*r)*e^2 + 18*a*r^3*x^6*x^(2*r)*e^2 - 432*b*d*n*r*x^6*x^r*e + 864*a*d*r^2*x^6*x^r*e + 70
2*b*d^2*r^2*x^6*log(c) + 270*b*r^2*x^6*x^(2*r)*e^2*log(c) + 3240*b*d*r*x^6*x^r*e*log(c) + 1944*b*d^2*n*r*x^6*l
og(x) + 1296*b*n*r*x^6*x^(2*r)*e^2*log(x) + 3888*b*d*n*x^6*x^r*e*log(x) - 324*b*d^2*n*r*x^6 + 702*a*d^2*r^2*x^
6 - 108*b*n*r*x^6*x^(2*r)*e^2 + 270*a*r^2*x^6*x^(2*r)*e^2 - 648*b*d*n*x^6*x^r*e + 3240*a*d*r*x^6*x^r*e + 1944*
b*d^2*r*x^6*log(c) + 1296*b*r*x^6*x^(2*r)*e^2*log(c) + 3888*b*d*x^6*x^r*e*log(c) + 1944*b*d^2*n*x^6*log(x) + 1
944*b*n*x^6*x^(2*r)*e^2*log(x) - 324*b*d^2*n*x^6 + 1944*a*d^2*r*x^6 - 324*b*n*x^6*x^(2*r)*e^2 + 1296*a*r*x^6*x
^(2*r)*e^2 + 3888*a*d*x^6*x^r*e + 1944*b*d^2*x^6*log(c) + 1944*b*x^6*x^(2*r)*e^2*log(c) + 1944*a*d^2*x^6 + 194
4*a*x^6*x^(2*r)*e^2)/(r^4 + 18*r^3 + 117*r^2 + 324*r + 324)